﻿Partial Public Class Login
  Inherits System.Web.UI.Page

  Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
    Dim strLogin As String = Login1.UserName
    Dim strPassword As String = Login1.Password

    If FormsAuthentication.Authenticate(strLogin, strPassword) Then
      Call FormsAuthentication.SetAuthCookie(strLogin, True)

      Call FormsAuthentication.RedirectFromLoginPage(strLogin, True)
    End If
  End Sub
End Class